package designPatterns.service.impl;

import designPatterns.PayResult;
import designPatterns.PayServiceCapacityFactory;
import designPatterns.TypeEnum;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

@Component
public class ApplePayServiceImpl implements PayService, InitializingBean {


    @Override
    public PayResult pay() {
        return null;
    }


    @Override
    public void afterPropertiesSet() throws Exception {
        PayServiceCapacityFactory.register(TypeEnum.ALIPAY.getType(), this);
    }
}
